package com.myproject.shop.service.impl;


import com.myproject.shop.domain.Sales;
import com.myproject.shop.mapper.SalesMapper;
import com.myproject.shop.service.ISalesService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Service

    public class SalesServiceImpl implements ISalesService {

        @Resource
        private SalesMapper salesMapper;

    @Override
    public List<Sales> selectSalesByTransactionTimeRange(Date baseTime) {
        return salesMapper.selectSalesByTransactionTimeRange(baseTime);
    }


        @Override
        public boolean addSales(Sales sales) {
            int result = salesMapper.insertSales(sales);
            return result == 1;
        }

}

